package com.workcell.workdata.xthings.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 厂商表
 *
 * @TableName t_manufacturer
 */
@TableName(value = "t_manufacturer")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "Manufacturer", description = "厂商")
public class Manufacturer implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty("主键")
    private String id;

    /**
     * 厂商编码（厂商ID）
     */
    @NotEmpty(message = "厂商ID不能为空")
    @ApiModelProperty("厂商编码（厂商ID）")
    private String manufacturerCode;

    /**
     * 厂商简称
     */
    @ApiModelProperty("厂商简称")
    private String manufacturerShortName;

    /**
     * 厂商全称
     */
    @NotEmpty(message = "厂商全称不能为空")
    @ApiModelProperty("厂商全称")
    private String manufacturerFullName;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    /**
     * 更新人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
